// // import Stack from "./stack/stack";
// import { Queue, PriorityQueue } from "./Queue/queue";
// import { LinkedList, } from "./linked_list/linked_list";
// import { DoublyLikedList as DoublyList } from "./linked_list/doubly_linked_list";
// import { HashTable, isPrime } from "./hash_table/hash_table"

import { SearchTree } from "./tree/index"
import { useEffect, useState } from "react"

function App() {
  const St = new SearchTree()

  St.insert(9)
  St.insert(5)
  St.remove(9)
  // console.log('St', St.remove(1))
  console.log(St)

  // St.houOrderTranverse()



  // const hashtable = new   HashTable()
  // hashtable.put('name', 'zhangsan')
  // hashtable.put('name1', '李四')
  // hashtable.put('name2', '李四1')
  // hashtable.put('name3', '李四1')
  // hashtable.put('name4', '李四1')
  // hashtable.put('name5', '李四1')
  // hashtable.put('name6', '李四1')
  // hashtable.put('name6', '李四1')
  // console.log(hashtable)
  // const arr: any[] = [0, 1, 2, 3, 4]
  // arr.forEach(e => {
  //   e = null
  // })
  // console.log("arr", isPrime(6))



  // // 栈s
  // 队列
  // const queue = new Queue()
  // queue.enqueue(1, 2, 3, 4, 5)

  // console.log("queue", queue.denqueue())

  // 优先级队列
  // const priorityQueue = new PriorityQueue()
  // priorityQueue.priorityEnqueue({ ele: 'test', order: 0 })
  // priorityQueue.priorityEnqueue({ ele: 'test2', order: -1 })
  // priorityQueue.priorityEnqueue({ ele: 'test99+1', order: 99 })
  // priorityQueue.priorityEnqueue({ ele: 'test99', order: 5 })

  // const linkedList = new LinkedList()
  // linkedList.append("test1")
  // linkedList.append("test2")
  // linkedList.append('test3')

  // linkedList.removeAt(1)
  // linkedList.insert(0, "12312313")
  // linkedList.update(2, "44")
  // linkedList.remove('test3')

  // console.log(linkedList)


  // console.log(linkedList.removeAt(0))

  // const doublyList = new DoublyList()
  // doublyList.append("test")
  // doublyList.append("test1")
  // doublyList.insert(1, "test-1")
  // doublyList.insert(0, "test00")

  // console.log(doublyList.indexOf('test1'))

  let dom2: any = null







  return (
    <div className="App">
      <div id="test" style={{
        height: 200,
        width: 200,
        background: "#000",
        position: "relative"
      }}></div>
      <div id="id_test_video" style={{ width: "100%" }}></div>
      <button onClick={
        () => {
          dom2.x = 10
        }
      }>点我</button>

    </div>
  );
}

export default App;
